import { axios } from '@/utils/http/request'

const api = {
  list: '/scen/dic/list',
  info: '/scen/dic/info/',
  delete: '/scen/dic/delete/'
}

const dataApi = {
  orgList: '/scen/medinsset/list',
  deptList: '/scen/deptset/list',
  admdvsList: '/scen/admdvsinfo/list'
}

export function getDictList (params) {
  return axios({
    url: api.list,
    method: 'post',
    params
  })
}

export function getDictById ({ appFieldName }) {
  return axios({
    url: api.info + appFieldName,
    method: 'get'
  })
}

export function getOrgList (headers, params) {
  return axios({
    url: dataApi.orgList,
    method: 'post',
    headers,
    params
  })
}

export function getDeptList (headers, params) {
  return axios({
    url: dataApi.deptList,
    method: 'post',
    headers,
    params
  })
}

export function getadmdvsList (headers) {
  return axios({
    url: dataApi.admdvsList,
    method: 'post',
    headers
  })
}
